// 导入公共的 common.less 文件
@import "common";

// 书写首页的css样式
body {
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial, Helvetica, STHeiTi, sans-serif;
    background-color: #f2f2f2;
}

ul,ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

// 后续的尺寸需要用rem单位
@baseFont: 50px;
// top_banner区域样式
.top_banner {
    position: relative;
    width: (750rem / @baseFont);
    height: (100rem / @baseFont);
    .top_banner_bg {
        display: block;
        width: 100%;
        height: 100%;
        img {
            display: block;
            width: 100%;
            height: 100%;
        }
    }
    .close {
        position: absolute;
        left: 0.1rem;
        top: 0.5rem;
        width: (50rem / @baseFont);
        height: (50rem / @baseFont);
        background: url(../images/close.png) no-repeat center center;
        background-size: (30rem / @baseFont);
    }
}

// header区域
.header {
    width: (750rem / @baseFont);
    height: (180rem / @baseFont);
    background-color: #ffdb47;
    .header_top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: (682rem / @baseFont);
        height: (88rem / @baseFont);
        padding: 0 (34rem / @baseFont);
        .classify {
            img {
                display: block;
                width: (36rem / @baseFont);
                height: (60rem / @baseFont);
            }
        }
        .ad {
            img {
                display: block;
                width: (450rem / @baseFont);
                height: (55rem / @baseFont);
                margin-right: (50rem / @baseFont);
            }
        }
        .login {
            img {
                display: block;
                width: (36rem / @baseFont);
                height: (60rem / @baseFont);
            }
        }
    }
    .search {
        position: relative;
        width: (750rem / @baseFont);
        height: (92rem / @baseFont);
        padding: 0 (24rem / @baseFont);
        box-sizing: border-box;
        a {
            display: block;
            position: absolute;
            top: 0;
            left: (24rem / @baseFont);
            width: (702rem / @baseFont);
            height: (88rem / @baseFont);
        }
        i {
            position: absolute;
            left: (42rem / @baseFont);
            top: (26rem / @baseFont);
            width: (36rem / @baseFont);
            height: (36rem / @baseFont);
            background: url(../images/search_btn.png) no-repeat;
            background-size: (36rem / @baseFont);
        }
        form {
            display: flex;
            align-items: center;
            width: (702rem / @baseFont);
            height: (88rem / @baseFont);
            input {
                border: none;
                width: (702rem / @baseFont);
                height: (64rem / @baseFont);
                padding: (3rem / @baseFont) (20rem / @baseFont) 0 (65rem / @baseFont);
                box-sizing: border-box;
                font-size: 0.56rem;
                line-height: (64rem / @baseFont);
                border-radius: (32rem / @baseFont);
            }
        }
    }
}

// banner区域
.banner {
    width: (750rem / @baseFont);
    height: (260rem / @baseFont);
    margin: 0;
    background: url(../images/banner_bg.png) no-repeat;
    background-size: (750rem / @baseFont);
    .wrapper {
        position: relative;
        width: (702rem / @baseFont);
        height: (260rem / @baseFont);
        margin: 0 auto;
        overflow: hidden;
        ul {
            position: relative;
            width: (702rem / @baseFont);
            height: (260rem / @baseFont);
            li {
                position: absolute;
                top: 0;
                left: (702rem / @baseFont);
                width: (702rem / @baseFont);
                height: (260rem / @baseFont);
                border-radius: (24rem / @baseFont);
                overflow: hidden;
                &.current {
                    left: 0;
                }
                img {
                    width: (702rem / @baseFont);
                    height: (260rem / @baseFont);
                }
            }
        }
        ol {
            display: flex;
            justify-content: center;
            position: absolute;
            bottom: 0.24rem;
            width: (702rem / @baseFont);
            height: (8rem / @baseFont);
            li {
                display: flex;
                justify-content: center;
                width: (18rem / @baseFont);
                height: (8rem / @baseFont);
                margin: 0 0.08rem;
                i {
                    width: (9rem / @baseFont);
                    height: (8rem / @baseFont);
                    background-color: rgba(0, 0, 0, 0.3);
                    border-radius: (4rem / @baseFont);
                }
                &.cur {
                    i {
                        width: (18rem / @baseFont);
                        background-color: #fff;
                    }
                }
            }
        }
    }
}

// nav区域
.nav {
    width: (750rem / @baseFont);
    height: (308rem / @baseFont);
    a {
        display: block;
        float: left;
        width: (150rem / @baseFont);
        height: (140rem / @baseFont);
        text-decoration: none;
        color: #666;
        font-size: (22rem / @baseFont);
        img {
            display: block;
            width: (84rem / @baseFont);
            height: (84rem / @baseFont);
            margin: (24rem / @baseFont) (33rem / @baseFont) 0;
        }
        p {
            height: (28rem / @baseFont);
            line-height: (28rem / @baseFont);
            text-align: center;
        }
    }
}

//红包区域
.red_packet {
    position: fixed;
    right: 0.2rem;
    bottom: 13rem;
    width: (100rem / @baseFont);
    height: (100rem / @baseFont);
    z-index: 1;
    img {
        display: block;
        width: 100%;
        height: 100%;
    }
}

// 新人优惠
.new_member {
    position: fixed;
    right: 0.2rem;
    bottom: 7.5rem;
    width: (100rem / @baseFont);
    height: (145rem / @baseFont);
    z-index: 1;
    img {
        display: block;
        width: 100%;
        height: 100%;
    }
}

// 广告区域
.last_ad {
    width: (750rem / @baseFont);
    height: (316rem / @baseFont);
    margin-top: 0.48rem;
    a {
        float: left;
        width: (248.4rem / @baseFont);
        height: 100%;
        img {
            display: block;
            width: 100%;
            height: 100%;
        }
    }
}

// 新品首发区域
.new_shop {
    width: (702rem / @baseFont);
    margin: 0 (24rem / @baseFont);
    margin-top: (24rem / @baseFont);
    border-bottom: (2rem / @baseFont) solid #f2f2f2;
    border-radius: .24rem .24rem 0 0;
    box-sizing: border-box;
    overflow: hidden;
    .shop_item {
        float: left;
        position: relative;
        width: (350rem / @baseFont);
        height: (258rem / @baseFont);
        background-color: #fff;
        .jump_page {
            display: block;
            position: absolute;
            left: 0;
            top: 0;
            width: (350rem / @baseFont);
            height: (258rem / @baseFont);
        }
        h3 {
            width: (112rem / @baseFont);
            height: (58rem / @baseFont);
            margin: (18rem / @baseFont) 0 0 (24rem / @baseFont);
            padding-top: (10rem / @baseFont);
            font-size: (28rem / @baseFont);
            line-height: (58rem / @baseFont);
            box-sizing: border-box;
            color: #333;
        }
        p {
            width: (300rem / @baseFont);
            height: (30rem / @baseFont);
            margin: (4rem / @baseFont) 0 0 (24rem / @baseFont);
            font-size: (24rem / @baseFont);
            line-height: (30rem / @baseFont);
            color: #999;
        }
        .img_a {
            display: inline-block;
            width: (140rem / @baseFont);
            height: (160rem / @baseFont);
            margin: (6rem / @baseFont) (10rem / @baseFont) 0;
            img {
                display: block;
                width: (120rem / @baseFont);
                height: (120rem / @baseFont);
                margin: 0 (10rem / @baseFont);
            }
        }
        &:nth-child(2n + 1)::after {
            position: absolute;
            right: 0;
            top: 0;
            content: "";
            width: (2rem / @baseFont);
            height: (258rem / @baseFont);
            background-color: #f2f2f2;
        }
    }
}

// 为你推荐区域样式
.recommend {
    width: (702rem / @baseFont);
    height: (172rem / @baseFont);
    margin: 0 (24rem / @baseFont);
    border-radius: 0 0 .24rem .24rem;
    background-color: #fff;
    .title {
        float: left;
        width: (173rem / @baseFont);
        height: 100%;
        padding: (47rem / @baseFont) (18rem / @baseFont) 0;
        box-sizing: border-box;
        h3 {
            margin: 0;
            font-size: (32rem / @baseFont);
            color: #444444;
        }
        p {
            margin: 0;
            font-size: (24rem / @baseFont);
            color: #999;
        }
    }
    .re_shop {
        float: left;
        a {
            display: block;
            float: left;
            width: (120rem / @baseFont);
            height: (172rem / @baseFont);
            margin-right: (10rem / @baseFont);
            text-decoration: none;
            text-align: center;
            img {
                display: block;
                width: (100rem / @baseFont);
                height: (100rem / @baseFont);
                padding-left: (10rem / @baseFont);
                padding-top: (20rem / @baseFont);
            }
            p {
                max-width: (120rem / @baseFont);
                margin: 0;
                font-size: (24rem / @baseFont);
                color: #333;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
            }
        }
    }
}

// 底部苏宁logo 
.snlogo {
    width: (750rem / @baseFont);
    height: (173rem / @baseFont);
    margin-bottom: (180rem / @baseFont);
    img {
        display: block;
        width: 100%;
    }
}

//底部导航
.bottom_nav {
    position: fixed;
    left: 0;
    bottom: 0;
    width: (750rem / @baseFont);
    height: (190rem /  @baseFont);
    .bottom_login {
        display: block;
        width: (750rem / @baseFont);
        height: (90rem / @baseFont);
        img {
            display: block;
            width: 100%;
        }
    }
    .tools {
        display: flex;
        width: (750rem / @baseFont);
        height: (100rem / @baseFont);
        background-color: #fff;
        a {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-decoration: none;
            img {
                width: (48rem / @baseFont);
            }
            span {
                font-size: (24rem / @baseFont);
                color: #000;
            }
        }
    }
}